package org.smile.design.decorator.custom;

import lombok.Data;
import org.smile.design.decorator.HouseDecoration;

@Data
public abstract class CustomDecorationScheme extends HouseDecoration {

    private HouseDecoration houseDecoration;

    public CustomDecorationScheme(HouseDecoration houseDecoration) {
        this.houseDecoration = houseDecoration;
    }

    @Override
    public Integer obtainTotal() {
        System.out.println(this.getClass().getSimpleName() + " add cost: " + this.getCost());
        return super.getCost() + houseDecoration.obtainTotal();
    }

    @Override
    public String describe() {
        System.out.println(this.getClass().getSimpleName() + " add" + this.getDescription());
        return super.getDescription() + houseDecoration.describe();
    }
}
